var _EsdDynamicTransformationFunction = function($){
/**
* 命名空间定义
*/
var _EsdDynamicTransformationScript = {};
_EsdDynamicTransformationScript.navBlock = {}; // 定义区域跳转类
_EsdDynamicTransformationScript.navBlock.selector = {};
/**
* 文本链接 a
*/
//保证所有a标签都有href
$("a").each(function(){

var aHref = this.href;
if( aHref=="" || aHref==undefined ){
$(this).attr("href","javascript:void(0)");
}

//给a标签加title
var aTitle = this.title;
var aText = this.text;

if( aTitle=="" || aTitle==undefined ){
if( aText!="" || aText!=undefined ){
$(this).attr("title",$.trim(aText));
}
}

});


//select下的option添加title
$("option").each(function(){
var oTitle = this.title;
var oText = this.text;
if( oTitle=="" || oTitle==undefined ){
if( oText!="" || oText!=undefined ){
$(this).attr("title",$.trim(oText));
}
}
});
/**
* 图片处理片段
*/

$('img[src="./images/jcsc_jy20171106.jpg"]').attr('title','监狱人民警察誓词').attr('alt','监狱人民警察誓词');$('img[src="./images/gaba_logo.png"]').attr('title','吉公网安备标识').attr('alt','吉公网安备标识');$('img[src="./jygl/201304/W020171114532366055801.jpg"]').attr('title','敦化监狱').attr('alt','敦化监狱');$('img[src="./jygl/201308/W020171114532429349215.jpg"]').attr('title','新康医院').attr('alt','新康医院');$('img[src="./jygl/201712/W020171226324664393218.jpg"]').attr('title','兴业监狱').attr('alt','兴业监狱');$('img[src="./images/jhbs_jy20171106.jpg"]').attr('title','警衔标识').attr('alt','警衔标识');$('img[src="./jygl/201712/W020171226534880492615.jpg"]').attr('title','通化监狱').attr('alt','通化监狱');$('img[src="./images/zwgk_icon6_jy20171106.jpg"]').attr('title','领导机制').attr('alt','领导机制');$('img[src="./jygl/201308/W020171114532440708211.jpg"]').attr('title','长春监狱').attr('alt','长春监狱');$('img[src="//dcs.conac.cn/image/red.png"]').attr('title','党政机关标识').attr('alt','党政机关标识');$('img[src="./yxmf/201304/W020171114529103801963.jpg"]').attr('title','英雄模范许宏远照片').attr('alt','英雄模范许宏远照片');$('img[src="./images/jygl_jy20171106.jpg"]').attr('title','监狱概况').attr('alt','监狱概况');$('img[src="./images/yjzj_jy20171106.jpg"]').attr('title','意见征集').attr('alt','意见征集');$('img[src="./jygl/201304/W020171114532375292339.jpg"]').attr('title','吉林监狱').attr('alt','吉林监狱');$('img[src="./images/yxmf_jy20171106.jpg"]').attr('title','英雄模范').attr('alt','英雄模范');$('img[src="./yxmf/201304/W020171114529107395574.jpg"]').attr('title','英雄模范李强照片').attr('alt','英雄模范李强照片');$('img[src="./tpxw/201912/W020191225483206032051.jpg"]').attr('title','我们的中国梦 奏响新时代--吉林省女子监狱与省文化馆联合举办2020年迎新年交响音乐会').attr('alt','我们的中国梦 奏响新时代--吉林省女子监狱与省文化馆联合举办2020年迎新年交响音乐会');$('img[src="./tpxw/201912/W020191213503521650190.jpg"]').attr('title','全省监狱系统优秀年轻干部执法能力提升专题培训班圆满结束').attr('alt','全省监狱系统优秀年轻干部执法能力提升专题培训班圆满结束');$('img[src="./yqlj/201508/W020171114533711830327.jpg"]').attr('title','吉林省人民检察院标识').attr('alt','吉林省人民检察院标识');$('img[src="./images/zwgk_icon3_jy20171106.jpg"]').attr('title','政府信息公开年度报告').attr('alt','政府信息公开年度报告');$('img[src="./tpxw/201912/W020191226368040266822.jpg"]').attr('title','北京市监狱管理局考察团到四平监狱参观考察').attr('alt','北京市监狱管理局考察团到四平监狱参观考察');$('img[src="./jygl/201308/W020171114532399376082.png"]').attr('title','延吉监狱').attr('alt','延吉监狱');$('img[src="./jygl/201712/W020171228372033011957.jpg"]').attr('title','铁北监狱').attr('alt','铁北监狱');$('img[src="./jygl/201308/W020171114532401661925.jpg"]').attr('title','辽源市监狱').attr('alt','辽源市监狱');$('img[src="./images/zwgk_icon5_jy20171106.jpg"]').attr('title','权责清单').attr('alt','权责清单');$('img[src="./yxmf/201304/W020171114529104769619.jpg"]').attr('title','英雄模范朴昌浩照片').attr('alt','英雄模范朴昌浩照片');$('img[src="./jygl/201308/W020190710314434422665.jpg"]').attr('title','北湖监狱').attr('alt','北湖监狱');$('img[src="./images/zxzx_jy20171106.jpg"]').attr('title','在线咨询').attr('alt','在线咨询');$('img[src="./jygl/201308/W020171114532396370077.jpg"]').attr('title','镇赉分局').attr('alt','镇赉分局');$('img[src="./tpxw/201912/W020191213521417008157.jpg"]').attr('title','吉林省监狱管理局召开2019年第十一次党组理论学习中心组集体学习(扩大)会议').attr('alt','吉林省监狱管理局召开2019年第十一次党组理论学习中心组集体学习(扩大)会议');$('img[src="./images/jzxx_jy20171106.jpg"]').attr('title','局长信箱').attr('alt','局长信箱');$('img[src="./yqlj/201508/W020171114533712597169.jpg"]').attr('title','吉林法院网标识').attr('alt','吉林法院网标识');$('img[src="./yxmf/201304/W020171114529101168457.jpg"]').attr('title','英雄模范张立平照片').attr('alt','英雄模范张立平照片');$('img[src="./images/zwgk_icon4_jy20171106.jpg"]').attr('title','依申请公开').attr('alt','依申请公开');$('img[src="./images/zwgk_icon1_jy20171106.jpg"]').attr('title','政府信息公开').attr('alt','政府信息公开');$('img[src="./jygl/201712/W020171222445596626638.jpg"]').attr('title','江城监狱').attr('alt','江城监狱');$('img[src="./jygl/201308/W020171114532417111065.jpg"]').attr('title','铁北监狱').attr('alt','铁北监狱');$('img[src="./images/xxcx_jy20171106.jpg"]').attr('title','服刑人员信息查询').attr('alt','服刑人员信息查询');$('img[src="./jygl/201308/W020171114532408767306.jpg"]').attr('title','女子监狱').attr('alt','女子监狱');$('img[src="./tpxw/201912/W020191203555157814440.jpg"]').attr('title','吉林省监狱数聚智慧安防指挥系统9.0版荣获司法部“数字法治、智慧司法”信息化优秀示范案例大比武二等奖').attr('alt','吉林省监狱数聚智慧安防指挥系统9.0版荣获司法部“数字法治、智慧司法”信息化优秀示范案例大比武二等奖');$('img[src="./jygl/201308/W020171114532420853855.jpg"]').attr('title','通化监狱').attr('alt','通化监狱');$('img[src="./jygl/201308/W020171114532382971729.jpg"]').attr('title','白城监狱').attr('alt','白城监狱');$('img[src="./jygl/201308/W020190709510050246067.jpg"]').attr('title','四平监狱').attr('alt','四平监狱');$('img[src="./images/zwgk_icon2_jy20171106.jpg"]').attr('title','政务信息公开指南').attr('alt','政务信息公开指南');$('img[src="./jygl/201308/W020171114532425185212.jpg"]').attr('title','未管所').attr('alt','未管所');$('img[src="./jygl/201712/W020171226556207849021.jpg"]').attr('title','长春监狱').attr('alt','长春监狱');$('img[src="./jygl/201712/W020171227553165927427.jpg"]').attr('title','宁江监狱').attr('alt','宁江监狱');$('img[src="./jygl/201308/W020171114532436959122.jpg"]').attr('title','英城监狱').attr('alt','英城监狱');$('img[src="./jygl/201308/W020171114532405479240.jpg"]').attr('title','梅河监狱').attr('alt','梅河监狱');$('img[src="./jygl/201712/W020171225406600069212.jpg"]').attr('title','吉林监狱').attr('alt','吉林监狱');$('img[src="./jygl/201308/W020171114532392328873.jpg"]').attr('title','江城监狱').attr('alt','江城监狱');$('img[src="./images/weixin2_jy20171106.jpg"]').attr('title','微信公众号二维码').attr('alt','微信公众号二维码');$('img[src="./yqlj/201508/W020171114533710394716.jpg"]').attr('title','中国文明网标识').attr('alt','中国文明网标识');$('img[src="./jygl/201308/W020171114532433211231.jpg"]').attr('title','兴业监狱').attr('alt','兴业监狱');$('img[src="./yxmf/201303/W020171114529099792007.jpg"]').attr('title','英雄模范高宣文照片').attr('alt','英雄模范高宣文照片');$('img[src="./jygl/201304/W020171114532370702557.jpg"]').attr('title','公主岭监狱').attr('alt','公主岭监狱');$('img[src="./yxmf/201304/W020171114529106408374.jpg"]').attr('title','英雄模范梅国刚照片').attr('alt','英雄模范梅国刚照片');$('img[src="./yqlj/201805/W020180503336260994771.jpg"]').attr('title','中华人民共和国司法部标识').attr('alt','中华人民共和国司法部标识');$('img[src="./jygl/201304/W020171114532379081827.jpg"]').attr('title','净月监狱').attr('alt','净月监狱');$('img[src="./yqlj/201508/W020171114533711155235.jpg"]').attr('title','吉林省公安厅标识').attr('alt','吉林省公安厅标识');

//img
$("img").each(function(){
//给图片加alt/title
var imgAlt = this.alt,
imgTitle = this.title,
imgSrc = this.src,
parentText = this.parentElement.text;

if(this.alt=="" || this.alt==undefined){
if(imgTitle!="" && imgTitle!=undefined){
$(this).attr("alt",imgTitle);
}else if(parentText!="" && parentText!=undefined){
$(this).attr("alt",parentText);
}
}
if(this.title=="" || this.title==undefined){
if(imgAlt!="" && imgAlt!=undefined){
$(this).attr("title",imgAlt);
}else if(parentText!="" && parentText!=undefined){
$(this).attr("title",parentText);
}
}
})

$("img").each(function(){
if( (this.alt=="" && this.title=="")||(this.alt==undefined && this.title==undefined) ){
$(this).attr("title","图片");
$(this).attr("alt","图片");
}
})
/**
* 共通头部
*/
$("#keyword").attr({
placeholder : "请输入您要查找的内容",
title : "请输入您要查找的内容"
});
$(".searchbtn").attr({
placeholder : "搜索",
title : "搜索"
});
/**
* 主导航
*/
if (window.location.href == 'http://jyj.jl.gov.cn/' || window.location.href == 'http://jyj.jl.gov.cn/index.html') {
// 轮播,右下角原点--鼠标点击触发情况
// 轮播：只获取轮播中一个a标签。
// 以文字a标签为主，图片a标签尽量不要，title不稳定

// 轮播前的标签
_EsdDynamicTransformationScript.esdTagFrontNum1 = $(".ttxw .ttxw_news_list ul li:eq(2) a");
// 文字A标签
_EsdDynamicTransformationScript.esdTagANum1 = $("#D1pic1 .fcon:eq(0) .shadow a");
_EsdDynamicTransformationScript.esdTagANum2 = $("#D1pic1 .fcon:eq(1) .shadow a");
_EsdDynamicTransformationScript.esdTagANum3 = $("#D1pic1 .fcon:eq(2) .shadow a");
_EsdDynamicTransformationScript.esdTagANum4 = $("#D1pic1 .fcon:eq(3) .shadow a");
_EsdDynamicTransformationScript.esdTagANum5 = $("#D1pic1 .fcon:eq(4) .shadow a");

// 原点
_EsdDynamicTransformationScript.esdTagCircleNum1 = $("#D1fBt a:eq(0) i");
_EsdDynamicTransformationScript.esdTagCircleNum2 = $("#D1fBt a:eq(1) i");
_EsdDynamicTransformationScript.esdTagCircleNum3 = $("#D1fBt a:eq(2) i");
_EsdDynamicTransformationScript.esdTagCircleNum4 = $("#D1fBt a:eq(3) i");
_EsdDynamicTransformationScript.esdTagCircleNum5 = $("#D1fBt a:eq(4) i");

// 轮播后的标签
_EsdDynamicTransformationScript.esdTagAfterNum1 = $(".gzdt .gzdt_title span a");

// 轮播前的焦点
_EsdDynamicTransformationScript.esdTagFrontNum1.focus(function(e) {
$(this).bind("keydown.keydown_0", function(e) {
if (e.shiftKey && e.keyCode == 9) {

} else if (e.keyCode == 9) {
$(this).unbind("keydown.keydown_0");
_EsdDynamicTransformationScript.esdTagCircleNum1.click();
_EsdDynamicTransformationScript.esdTagANum1.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esdTagFrontNum1.blur(function() {
$(this).unbind("keydown.keydown_0");
});
// 第一块
_EsdDynamicTransformationScript.esdTagANum1.focus(function(e) {
//		_EsdDynamicTransformationScript.esdTagCircleNum1.click();
$(this).bind("keydown.keydown_1", function(e) {
if (e.shiftKey && e.keyCode == 9) {

} else if (e.keyCode == 9) {
$(this).unbind("keydown.keydown_1");
_EsdDynamicTransformationScript.esdTagCircleNum2.click();
_EsdDynamicTransformationScript.esdTagANum2.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esdTagANum1.blur(function() {
$(this).unbind("keydown.keydown_1");
});
// 第二块
_EsdDynamicTransformationScript.esdTagANum2.focus(function(e) {
//		_EsdDynamicTransformationScript.esdTagCircleNum2.click();
$(this).bind("keydown.keydown_2", function(e) {
if (e.shiftKey && e.keyCode == 9) {
_EsdDynamicTransformationScript.esdTagCircleNum1.click();
_EsdDynamicTransformationScript.esdTagANum1.focus();
return false;
} else if (e.keyCode == 9) {
$(this).unbind("keydown.keydown_2");
_EsdDynamicTransformationScript.esdTagCircleNum3.click();
_EsdDynamicTransformationScript.esdTagANum3.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esdTagANum2.blur(function() {
$(this).unbind("keydown.keydown_2");
});

// 第三块
_EsdDynamicTransformationScript.esdTagANum3.focus(function(e) {
//		_EsdDynamicTransformationScript.esdTagCircleNum3.click();
$(this).bind("keydown.keydown_3", function(e) {
if (e.shiftKey && e.keyCode == 9) {
_EsdDynamicTransformationScript.esdTagCircleNum2.click();
_EsdDynamicTransformationScript.esdTagANum2.focus();
return false;
} else if (e.keyCode == 9) {
$(this).unbind("keydown.keydown_3");
_EsdDynamicTransformationScript.esdTagCircleNum4.click();
_EsdDynamicTransformationScript.esdTagANum4.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esdTagANum3.blur(function() {
$(this).unbind("keydown.keydown_3");
});
// 第四块
_EsdDynamicTransformationScript.esdTagANum4.focus(function(e) {
//		_EsdDynamicTransformationScript.esdTagCircleNum4.click();
$(this).bind("keydown.keydown_4", function(e) {
if (e.shiftKey && e.keyCode == 9) {
_EsdDynamicTransformationScript.esdTagCircleNum3.click();
_EsdDynamicTransformationScript.esdTagANum3.focus();
return false;
} else if (e.keyCode == 9) {
$(this).unbind("keydown.keydown_4");
_EsdDynamicTransformationScript.esdTagCircleNum5.click();
_EsdDynamicTransformationScript.esdTagANum5.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esdTagANum4.blur(function() {
$(this).unbind("keydown.keydown_4");
});

// 第五块
_EsdDynamicTransformationScript.esdTagANum5.focus(function(e) {
//		_EsdDynamicTransformationScript.esdTagCircleNum5.click();
$(this).bind("keydown.keydown_5", function(e) {
if (e.shiftKey && e.keyCode == 9) {
_EsdDynamicTransformationScript.esdTagCircleNum4.click();
_EsdDynamicTransformationScript.esdTagANum4.focus();
return false;
} else if (e.keyCode == 9) {
$(this).unbind("keydown.keydown_5");
_EsdDynamicTransformationScript.esdTagAfterNum1.focus();
return false;
}
});

});
_EsdDynamicTransformationScript.esdTagANum5.blur(function() {
$(this).unbind("keydown.keydown_5");
});

// 轮播后的焦点
_EsdDynamicTransformationScript.esdTagAfterNum1.focus(function(e) {
$(this).bind("keydown.keydown_6", function(e) {
if (e.shiftKey && e.keyCode == 9) {
_EsdDynamicTransformationScript.esdTagCircleNum5.click();
_EsdDynamicTransformationScript.esdTagANum5.focus();
return false;
} else if (e.keyCode == 9) {

}
});
});
_EsdDynamicTransformationScript.esdTagAfterNum1.blur(function() {
$(this).unbind("keydown.keydown_6");
});

}
/**
* 二级页
*/
/**
* 主页js
*/
if (window.location.href == 'http://jyj.jl.gov.cn/' || window.location.href == 'http://jyj.jl.gov.cn/index.html') {
_EsdDynamicTransformationScript.getIframeInfos = function(jsObj, iframeObj) {
jsObj.aLink_num = iframeObj.contentWindow.document.getElementsByTagName("a").length;
jsObj.first_aLink = iframeObj.contentWindow.document.getElementsByTagName("a")[0];
jsObj.last_aLink = iframeObj.contentWindow.document.getElementsByTagName("a")[jsObj.aLink_num - 1];
jsObj.self = iframeObj;
};

//将iframe所包含的a链接数 第一个a元素 最后一个a元素赋值给第一个参数的js对象
_EsdDynamicTransformationScript.getIframeInfos = function(jsObj,iframeObj){
if(iframeObj != undefined){
jsObj.aLink_num = iframeObj.contentWindow.document.getElementsByTagName("a").length;
jsObj.first_aLink = iframeObj.contentWindow.document.getElementsByTagName("a")[0];
jsObj.last_aLink = iframeObj.contentWindow.document.getElementsByTagName("a")[jsObj.aLink_num-1];
jsObj.self = iframeObj;
}
};

//声明iframe操作对象
_EsdDynamicTransformationScript.iframe1 = {};
_EsdDynamicTransformationScript.iframe2 = {};

_EsdDynamicTransformationScript.iframeElement1 = document.getElementsByTagName("iframe")[0];   // 需要修改 这里的iframe获取
_EsdDynamicTransformationScript.iframeElement2 = document.getElementsByTagName("iframe")[1];   // 需要修改 这里的iframe获取

// 选项卡标签 jquery对象
_EsdDynamicTransformationScript.iframeTab1 = $(".zyxx .zyxx_title a:eq(0)"); // 需要修改
// 这里的tab获取
_EsdDynamicTransformationScript.iframeTab2 = $(".zyxx .zyxx_title a:eq(1)"); // 需要修改

// 判断iframe是否有效
if((_EsdDynamicTransformationScript.iframeElement1!=undefined) && (_EsdDynamicTransformationScript.iframeElement2!=undefined)){

// 当iframe都加载完毕后执行代码 使用setInterval
_EsdDynamicTransformationScript.iframeInterval = setInterval(function(){

if((_EsdDynamicTransformationScript.iframeElement1.contentWindow.document.getElementsByTagName("a")[0]!=undefined)
&&_EsdDynamicTransformationScript.iframeElement2.contentWindow.document.getElementsByTagName("a")[0]!=undefined ){
clearInterval(_EsdDynamicTransformationScript.iframeInterval);

//通过方法赋值
_EsdDynamicTransformationScript.getIframeInfos(_EsdDynamicTransformationScript.iframe1,_EsdDynamicTransformationScript.iframeElement1);
_EsdDynamicTransformationScript.getIframeInfos(_EsdDynamicTransformationScript.iframe2,_EsdDynamicTransformationScript.iframeElement2);

// 第一个标签 切换
_EsdDynamicTransformationScript.iframeTab1.focus(function(e) {
viewz(1);
//					e = $(this).mouseover();
$(document).bind("keydown.iframeKeydown_1", function(e) {
if (e.shiftKey && e.keyCode == 9) {
_EsdDynamicTransformationScript.iframeTab1.trigger("blur");
$(".main .gzdt a:last").focus();
return false;
} else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.iframeTab1.trigger("blur");
$(_EsdDynamicTransformationScript.iframe1.self).focus();
return false;
}
});
});
_EsdDynamicTransformationScript.iframeTab1.blur(function() {
$(document).unbind("keydown.iframeKeydown_1");
});

// 第一个标签的第一个链接
$(_EsdDynamicTransformationScript.iframe1.first_aLink).focus(function() {
$(_EsdDynamicTransformationScript.iframe1.self.contentWindow.document).bind("keydown.iframeKeydown_first1", function(e) {
if (e.shiftKey && e.keyCode == 9) {
$(document).trigger("blur");
_EsdDynamicTransformationScript.iframeTab1.focus();
return false;
} else if (e.keyCode == 9) {
}
});
});
$(_EsdDynamicTransformationScript.iframe1.first_aLink).blur(function() {
$(_EsdDynamicTransformationScript.iframe1.self.contentWindow.document).unbind("keydown.iframeKeydown_first1");
});

// 第一个标签的最后一个链接
$(_EsdDynamicTransformationScript.iframe1.last_aLink).focus(function() {
$(_EsdDynamicTransformationScript.iframe1.self.contentWindow.document).bind("keydown.iframeKeydown_first1", function(e) {
if (e.shiftKey && e.keyCode == 9) {

} else if (e.keyCode == 9) {
viewz(2);
$(document).trigger("blur");
_EsdDynamicTransformationScript.iframeTab2.focus();
return false;
}
});
});
$(_EsdDynamicTransformationScript.iframe1.last_aLink).blur(function() {
$(_EsdDynamicTransformationScript.iframe1.self.contentWindow.document).unbind("keydown.iframeKeydown_first1");
});

// 第二个标签切换
_EsdDynamicTransformationScript.iframeTab2.focus(function(e) {
//					e = $(this).mouseover();
$(document).bind("keydown.iframeKeydown_2", function(e) {
if (e.shiftKey && e.keyCode == 9) {
viewz(1);
_EsdDynamicTransformationScript.iframeTab2.trigger("blur");
_EsdDynamicTransformationScript.iframeTab1.mouseover();
$(_EsdDynamicTransformationScript.iframe1.last_aLink).focus();
return false;
} else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.iframeTab2.trigger("blur");
$(_EsdDynamicTransformationScript.iframe2.self).focus();
return false;
}
});

});
_EsdDynamicTransformationScript.iframeTab2.blur(function() {
$(document).unbind("keydown.iframeKeydown_2");
});
}

}, 500);

}
}
/**
* 共通底部处理
*/
/**
* 区域导航选择器
*/

if (window.location.href == 'http://jyj.jl.gov.cn/' || window.location.href == 'http://jyj.jl.gov.cn/index.html') {

_EsdDynamicTransformationScript.navBlock.selector.top = ".header";
_EsdDynamicTransformationScript.navBlock.selector.nav = ".nav";
_EsdDynamicTransformationScript.navBlock.selector.footer = ".footer";
_EsdDynamicTransformationScript.navBlock.selector.main = ".main";

$(".searchbox").addClass("navBlock");
$(".nav").addClass("navBlock");
$(".main").addClass("navBlock");
$(".footer").addClass("navBlock");
$(".ttxw").addClass("navBlock");
$(".tpxw").addClass("navBlock");
$(".gzdt").addClass("navBlock");
$(".zyxx").addClass("navBlock");
$(".part:eq(0) .news:eq(0)").addClass("navBlock");
$(".jld").addClass("navBlock");
$(".zwgk").addClass("navBlock");
$(".zwgk_r .news:eq(0)").addClass("navBlock");
$(".zwgk_r .news:eq(1)").addClass("navBlock");
$(".yxmf").addClass("navBlock");
$(".jygl").addClass("navBlock");
$(".dwjs_l .news:eq(0)").addClass("navBlock");
$(".dwjs_l .news:eq(1)").addClass("navBlock");
$(".part:eq(4) .fr").addClass("navBlock");
$(".part:eq(5)").addClass("navBlock");
$(".positon").addClass("navBlock");
}
// -------------------------------二级页选择器------------------------------------
if (window.location.href == 'http://jyj.jl.gov.cn/jgsz/' || window.location.href == 'http://jyj.jl.gov.cn/zwgk/hyzl/' || window.location.href == 'http://jyj.jl.gov.cn/gzdt/'
|| window.location.href == 'http://jyj.jl.gov.cn/ztbd/' || window.location.href == 'http://jyj.jl.gov.cn/gkxx/' || window.location.href == 'http://jyj.jl.gov.cn/ywgk/'
|| window.location.href == 'http://jyj.jl.gov.cn/gsgg/' || window.location.href == 'http://jyj.jl.gov.cn/zwgk/ldjz/' || window.location.href == 'http://jyj.jl.gov.cn/dwjs/'
|| window.location.href == 'http://jyj.jl.gov.cn/hgzl/' || window.location.href == 'http://jyj.jl.gov.cn/wshd/jzxx/' || window.location.href == 'http://jyj.jl.gov.cn/wshd/yjzj/'
|| window.location.href == 'http://jyj.jl.gov.cn/wshd/zxzx/') {
_EsdDynamicTransformationScript.navBlock.selector.top = ".header";
_EsdDynamicTransformationScript.navBlock.selector.nav = ".nav";
_EsdDynamicTransformationScript.navBlock.selector.footer = ".footer";
_EsdDynamicTransformationScript.navBlock.selector.main = ".main";
_EsdDynamicTransformationScript.navBlock.selector.left = ".zwgk";
_EsdDynamicTransformationScript.navBlock.selector.right = ".zwgk_r";
$(".searchbox").addClass("navBlock");
$(".nav").addClass("navBlock");
$(".main").addClass("navBlock");
$(".footer").addClass("navBlock");
$(".positon").addClass("navBlock");
$(".zwgk").addClass("navBlock");
$(".zwgk_r").addClass("navBlock");
}


//面包屑导航（除首页）
if( $(".CurrChnlCls").length > 0 ){

//目录页的翻页input处理
$("#num").attr("title","跳转到第多少页");
$("#num").attr("placeholder","跳转到第多少页");
$(".zt9 input[type='submit']").attr("title","提交");
$(".zt9 input[type='submit']").attr("placeholder","提交");

_EsdDynamicTransformationScript.navBlock.selector.top = ".header";
_EsdDynamicTransformationScript.navBlock.selector.nav = ".nav";
_EsdDynamicTransformationScript.navBlock.selector.footer = ".footer";
_EsdDynamicTransformationScript.navBlock.selector.main = ".main";
_EsdDynamicTransformationScript.navBlock.selector.left = ".zwgk";
_EsdDynamicTransformationScript.navBlock.selector.right = ".zwgk_r";
_EsdDynamicTransformationScript.navBlock.selector.content="#zoom";

$(".header").addClass("navBlock");
$(".nav").addClass("navBlock");
$(".footer").addClass("navBlock");
$(".main").addClass("navBlock");
$(".zwgk").addClass("navBlock");
$(".zwgk_r").addClass("navBlock");
$("#zoom").addClass("navBlock");

_EsdDynamicTransformationScript.navBlock.selector.activate = ".navBlock"; //激活的采用class因为会激活多个
}


/**
* 区域导航、调试开关
*/

$(document).bind("keydown.keydown_9001", function(e) {
if (e.shiftKey && e.keyCode == 20) {
$("*").focus(function() {
$(this).css({
"outline" : "2px dashed red"
});
});
$("*").blur(function() {
$(this).css({
"outline" : "0px black"
});
});
}
});

_EsdDynamicTransformationScript.navBlock.debug = true; // 是否是调试模式，调试模式有红边线，非调试模式关闭红边框
_EsdDynamicTransformationScript.navBlock.selector.activate = ".navBlock"; // 激活的采用class因为会激活多个
// 快捷键定义区
//_EsdDynamicTransformationScript.navBlock.key = {};

//_EsdDynamicTransformationScript.navBlock.key.top = "alt+1"; // (top)
//_EsdDynamicTransformationScript.navBlock.key.nav = "alt+2"; // (nav)
//_EsdDynamicTransformationScript.navBlock.key.main = "alt+3"; // (main)
//_EsdDynamicTransformationScript.navBlock.key.content = "alt+4"; // (content)
//_EsdDynamicTransformationScript.navBlock.key.left = "alt+5"; // (left)
//_EsdDynamicTransformationScript.navBlock.key.right = "alt+6"; // (right)
//_EsdDynamicTransformationScript.navBlock.key.footer = "alt+7"; // (footer)
//_EsdDynamicTransformationScript.navBlock.key.down = "alt+8"; // (down)
//_EsdDynamicTransformationScript.navBlock.key.up = "alt+9"; // (up);

// 以下变量主要用于区块跳转
_EsdDynamicTransformationScript.navBlock.sIndex = -1; // 当前栏目下标
_EsdDynamicTransformationScript.navBlock.maxIndex = -1; // 保存目前所有class="navBlock"的区域块总数量，栏目总量下标。
_EsdDynamicTransformationScript.navBlock.minIndex = 0; // 栏目数量起始下标

// 主要代码区域

// 导航跳转
_EsdDynamicTransformationScript.navBlock.keyShowSelect = function(i) {
$(_EsdDynamicTransformationScript.navBlock.selector.activate).each(function(index, el) {
if (i == index) {
_EsdDynamicTransformationScript.navBlock.debugView(el);
$(el).find("a").each(function(i, e) {
if (i == 0) {
$(e).focus();
}
});

}
});
}

// 获取所有class=navBlock的区域的总数量，初始化轮训所有需要跳转的块
$(_EsdDynamicTransformationScript.navBlock.selector.activate).each(function(index, ehx) {
_EsdDynamicTransformationScript.navBlock.maxIndex++;
});



// 快捷键功能区域
// 跳转到头部alt+1(49)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 49) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.top);
}

});
// 跳转到导航alt+2(50)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 50) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.nav);
}

});
// 跳转到主要区域alt+3(51)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 51) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.main);
}
});

// 跳转到正文区域alt+4(52)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 52) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.content);
}
});

// 跳转到左区域alt+5(53)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 53) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.left);
}
});

// 跳转到右区域alt+6(54)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 54) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.right);
}
});
// 跳转到底部alt+7(55)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 55) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.footer);
}
});
//前进alt+8(56)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 56) {
if (_EsdDynamicTransformationScript.navBlock.sIndex < _EsdDynamicTransformationScript.navBlock.maxIndex) {
_EsdDynamicTransformationScript.navBlock.sIndex++;
_EsdDynamicTransformationScript.navBlock.keyShowSelect(_EsdDynamicTransformationScript.navBlock.sIndex);
}
}
});

// 后退alt+9(57)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 57) {
if (_EsdDynamicTransformationScript.navBlock.sIndex > _EsdDynamicTransformationScript.navBlock.minIndex) {
_EsdDynamicTransformationScript.navBlock.sIndex--;
_EsdDynamicTransformationScript.navBlock.keyShowSelect(_EsdDynamicTransformationScript.navBlock.sIndex);
}
}
});
// 特定区域跳转
_EsdDynamicTransformationScript.navBlock.keySelectScroll = function(id) {
if ($(id).length > 0) {
_EsdDynamicTransformationScript.navBlock.appendIns(id,true);//插入ins
_EsdDynamicTransformationScript.navBlock.debugView(id);
$(id).find("a").each(function(index) {
if (index == 0) {
$(this).focus();
}
});
_EsdDynamicTransformationScript.navBlock.appendIns(id,false);//清楚ins
} else {
}

}
//为了解决漂浮高等于0的情况下区域显示是一条线
_EsdDynamicTransformationScript.navBlock.appendIns=function(id,b){
if(b==true){
$(id).append("<ins id='esdNavBlockIns' style='clear: both;display: block;'></ins>")
}else{
$("#esdNavBlockIns").remove();
}
}

if (_EsdDynamicTransformationScript.navBlock.debug == true) {
// 如果开启调试模式，添加调试绘制矩形边线
$("body").append("<div id='show_top' class='lineshow'></div>");
$("body").append("<div id='show_bottom' class='lineshow'></div>");
$("body").append("<div id='show_left' class='lineshow'></div>");
$("body").append("<div id='show_right' class='lineshow'></div>");
$(".lineshow").css({
"display" : "none"
});
}
// 开启调试模式后会显示红边
_EsdDynamicTransformationScript.navBlock.debugView = function(e) {
if (_EsdDynamicTransformationScript.navBlock.debug == true) {
var x = $(e).offset();
//var w = parseInt($(e).css("width"));
var w = $(e).outerWidth();//返回元素的宽度（包含 padding 和 border）
//var h = parseInt($(e).css("height"));
var h = $(e).outerHeight();//返回元素的高度（包含 padding 和 border）
$("#show_top").css({
"z-index" : "9999",
"border" : "red 2px solid",
"position" : "absolute",
"top" : x.top,
"left" : x.left,
"width" : w,
"height" : "0px"
});
$("#show_bottom").css({
"z-index" : "9999",
"border" : "red 2px solid",
"position" : "absolute",
"top" : x.top + h,
"left" : x.left,
"width" : w,
"height" : "0px"
});
$("#show_left").css({
"z-index" : "9999",
"border" : "red 2px solid",
"position" : "absolute",
"top" : x.top,
"left" : x.left,
"width" : "0px",
"height" : h
});
$("#show_right").css({
"z-index" : "9999",
"border" : "red 2px solid",
"position" : "absolute",
"top" : x.top,
"left" : x.left + w,
"width" : "0px",
"height" : h
});
$("html,body").animate({
scrollTop : $("#show_top").offset().top
}, 200);
$(".lineshow").css({
"display" : "block"
});
}
}
};
/**
* 主入口方法
*/

if (window.jQuery == undefined) {
var wzaInitInterval = setInterval(function(){
if(document.body!=null){
clearInterval(wzaInitInterval);
//			var originalWindowOnload = null;
//			if(window.onload!=null){
//				originalWindowOnload = window.onload;
//			}
document.body.onload = function(){
//				originalWindowOnload();
var esdJquery = document.createElement("script");
esdJquery.setAttribute("type", "text/javascript");
esdJquery.setAttribute("src", window.location.protocol + "//" + window.location.href.split("/")[2] + "/wza/bwscript/jquery-1.12.4.min.js");
esdJquery.setAttribute("charset", "utf-8");
esdJquery.setAttribute("id", "ESDWebAppInnerIframe");
document.body.appendChild(esdJquery);
var jqueryLoadInterval = setInterval(function () {
if (window.jQuery != undefined) {
clearInterval(jqueryLoadInterval);
setTimeout( _EsdDynamicTransformationFunction(jQuery) , 1000 );
//						_EsdDynamicTransformationFunction(jQuery)
}
}, 500);
};
}
}, 10);
} else {
jQuery(function(){
setTimeout( _EsdDynamicTransformationFunction(jQuery) , 1000 );
//		_EsdDynamicTransformationFunction(jQuery)
})

}
